home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gnu / adainc / a-numaux.ads < prev    next >
Text File  |  1996-01-30  |  4KB  |  78 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT RUNTIME COMPONENTS                          --
  4. --                                                                          --
  5. --                     A D A . N U M E R I C S . A U X                      --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                           (C Library Version)                            --
  9. --                                                                          --
  10. --                            $Revision: 1.5 $                              --
  11. --                                                                          --
  12. --           Copyright (c) 1992,1993,1994 NYU, All Rights Reserved          --
  13. --                                                                          --
  14. -- GNAT is free software;  you can  redistribute it  and/or modify it under --
  15. -- terms of the  GNU General Public License as published  by the Free Soft- --
  16. -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
  17. -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
  18. -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
  19. -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
  20. -- for  more details.  You should have  received  a copy of the GNU General --
  21. -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
  22. -- to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. --
  23. --                                                                          --
  24. ------------------------------------------------------------------------------
  25.  
  26. --  This package provides the basic computational interface for the generic
  27. --  elementary functions. The C library version interfaces with the routines
  28. --  in the C mathematical library, and is thus quite portable, although it may
  29. --  not necessarily meet the requirements for accuracy in the numerics annex.
  30. --  One advantage of using this package is that it will interface directly to
  31. --  hardware instructions, such as the those provided on the Intel 80x87.
  32.  
  33. package Ada.Numerics.Aux is
  34. pragma Pure (Aux);
  35.  
  36.    subtype Double is Long_Float; -- implementation dependent
  37.  
  38.    function Sin (X : Double) return Double;
  39.    pragma Import (C, Sin, "sin");
  40.  
  41.    function Cos (X : Double) return Double;
  42.    pragma Import (C, Cos, "cos");
  43.  
  44.    function Tan (X : Double) return Double;
  45.    pragma Import (C, Tan, "tan");
  46.  
  47.    function Exp (X : Double) return Double;
  48.    pragma Import (C, Exp, "exp");
  49.  
  50.    function Sqrt (X : Double) return Double;
  51.    pragma Import (C, Sqrt, "sqrt");
  52.  
  53.    function Log (X : Double) return Double;
  54.    pragma Import (C, Log, "log");
  55.  
  56.    function Acos (X : Double) return Double;
  57.    pragma Import (C, Acos, "acos");
  58.  
  59.    function Asin (X : Double) return Double;
  60.    pragma Import (C, Asin, "asin");
  61.  
  62.    function Atan (X : Double) return Double;
  63.    pragma Import (C, Atan, "atan");
  64.  
  65.    function Sinh (X : Double) return Double;
  66.    pragma Import (C, Sinh, "sinh");
  67.  
  68.    function Cosh (X : Double) return Double;
  69.    pragma Import (C, Cosh, "cosh");
  70.  
  71.    function Tanh (X : Double) return Double;
  72.    pragma Import (C, Tanh, "tanh");
  73.  
  74.    function Pow (X, Y : Double) return Double;
  75.    pragma Import (C, Pow, "pow");
  76.  
  77. end Ada.Numerics.Aux;
  78.